<template>
  <div class="sy-container more">
    <section class="gd1">
      <a href="javascript:;" @click="back()"></a><h3>分类</h3>
    </section>
    <div class="morect">
      <ul class="left">
        <li v-for="(data,id) in title.index.oneTwoServiceData" :key="id" @mouseover="select = id" :class="select==id?'select':''">{{data.servicename}}</li>
      </ul>
      <div class="rt">
        <img src="~/assets/img/m-infobanner.png" class="gg">
        <ul>
          <li v-for="(data,id) in title.index.oneTwoServiceData[select].twoServiceRes" class="wbli">
            <h4>{{data.servicename}}</h4>
            <ul>
              <li v-for="(datasr,ind2) in loadList(data.id)">{{datasr.descript}}</li>
            </ul>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
  import axios from 'axios';
  import $ from 'jquery';

  // import Logo from '~/components/Logo.vue'

  export default {

    components: {
      // Logo
    },
    data(){
      return{
        datas:null,
        gjdata:['工商服务管家','财税服务管家','知识产权管家','人事社保管家','资质审批管家'],
        gjdt:0,
        select:0,
        nav:['工商服务','财税服务','知识产权','人事社保','资质计算器']
      }
    },
    async asyncData ({ params }) {
    let nh = await axios.get(`https://exam.zhonghaiqihang.com/PInterface/Header/headerData`);
    let data  = {index:nh.data};
    return { title: data}
  },
  head(){
    return {
      title: '更多',
      meta: [
        { hid: 'description', name: 'description', content: '更多'},
        { hid: 'keywords', name: 'keywords', content:'更多'}
      ]
    }
  },
  computed: {
    loadList() {
      return (type) => {
        let newData = [];
        this.title.index.threeServiceData.forEach(item => {
          if(item.pid == type) {
          newData.push(item);
        }
      });
        return newData;
      };
    }
  },
  mounted:function(){
    $('header').hide();
         $(document).ready(function(){
      $('.tbnava7').addClass('select');
    })
  },
  methods:{
    back:function(){
      this.$router.go(-1);
    }
  }

  }
</script>

<style>

</style>
